<%@ page language="java" contentType="text/html; charset=UTF-8"
	pageEncoding="UTF-8"%>
<!--超级管理员登录页面-->
<!--只需要输入密码-->
<!DOCTYPE html>
<html lang="en">
<meta charset="utf-8">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<title>超管登录</title>
<link rel="shortcut icon" href="img/favicon.ico">
<!--STYLESHEET-->
<!--=================================================-->
<!--Roboto Slab Font [ OPTIONAL ] -->
<link
	href="http://fonts.googleapis.com/css?family=Roboto+Slab:400,300,100,700"
	rel="stylesheet">
<link
	href="http://fonts.googleapis.com/css?family=Roboto:500,400italic,100,700italic,300,700,500italic,400"
	rel="stylesheet">
<!--Bootstrap Stylesheet [ REQUIRED ]-->
<link href="css/bootstrap.min.css" rel="stylesheet">
<!--Jasmine Stylesheet [ REQUIRED ]-->
<link href="css/style.css" rel="stylesheet">
<!--Font Awesome [ OPTIONAL ]-->
<link href="plugins/font-awesome/css/font-awesome.min.css"
	rel="stylesheet">
<!--Switchery [ OPTIONAL ]-->
<link href="plugins/switchery/switchery.min.css" rel="stylesheet">
<!--Bootstrap Select [ OPTIONAL ]-->
<link href="plugins/bootstrap-select/bootstrap-select.min.css"
	rel="stylesheet">
<!--Demo [ DEMONSTRATION ]-->
<link href="css/demo/jasmine.css" rel="stylesheet">
<!--SCRIPT-->
<!--=================================================-->
<!--Page Load Progress Bar [ OPTIONAL ]-->
<link href="plugins/pace/pace.min.css" rel="stylesheet">
<script src="plugins/pace/pace.min.js"></script>
</head>
<!--You may remove all ID or Class names which contain "demo-", they are only used for demonstration. -->
<body>
	<div id="container" class="cls-container">
		<!-- Start Lock Screen  -->
		<!--===================================================-->
		<div class="lock-wrapper">
			<div class="panel lock-box">
				<div class="center">
					<img alt="" src="img/user.png" class="img-circle" />
				</div>
				<h4>你好！超级管理员</h4>
				<p class="text-center">请登录以访问您的帐户</p>
				<div class="row">
					<form action="../SuperAdminServlet" class="form-inline">
						<div class="form-group col-md-12 col-sm-12 col-xs-12">
							<div class="text-left">
								<label for="signupInputPassword" class="text-muted">密码</label> <label
									id="hospitalTip"></label> <input type="hidden" name="op"
									value="login" /> <input id="superPassword"
									name="superPassword" type="password" placeholder="Password"
									class="form-control lock-input" />
							</div>
							<button type="submit" class="btn btn-block btn-primary">
								登录</button>
						</div>
					</form>
				</div>
			</div>
		</div>
	</div>

	<!--jQuery [ REQUIRED ]-->
	<script src="js/jquery-2.1.1.min.js"></script>
	<!--BootstrapJS [ RECOMMENDED ]-->
	<script src="js/bootstrap.min.js"></script>
	<!--Fast Click [ OPTIONAL ]-->
	<script src="plugins/fast-click/fastclick.min.js"></script>
	<!--Switchery [ OPTIONAL ]-->
	<script src="plugins/switchery/switchery.min.js"></script>
	<!--Bootstrap Select [ OPTIONAL ]-->
	<script src="plugins/bootstrap-select/bootstrap-select.min.js"></script>
	<script>
		//对用户输入框失去焦点事件
		$("#superPassword").blur(function() {
			
			var superPassword = $(this).val();
			if (superPassword.trim().length == 0) {
				$("#hospitalTip").text("此处不能为空");
				$("#hospitalTip").removeClass("success");
				$("#hospitalTip").addClass("error");
				//提交按钮禁用
				$(".btn btn-block btn-primary").prop("disabled", true);
			} else {
				$("#hospitalTip").text("");
				//提交按钮可用
				$(".btn btn-block btn-primary").prop("disabled", false);
			}
		});
		$(document).ready(function() {
			var op = "${param.op}";
			if (op == "errors") {
				alert("密码错误！请重新登录");
				location.href = "superadminlogin.jsp";
			}
			
			var msg ="${param.msg}";
			if(msg!=""){
				alert("请先登录！")
				location.href="superadminlogin.jsp";
			}
		});
	</script>
</body>
</html>